package com.sjgs.common;

public final class Constants {

    public static final int KB = 1024;
    public static final int MB = KB * 1024;
    public static final int GB = MB * 1024;
    public static final long TB = GB * 1024L;
    public static final long PB = TB * 1024L;

    public static final long CHUNK_SIZE_VERY_LOW = KB * 256;
    public static final long CHUNK_SIZE_LOW = KB * 512;
    public static final long CHUNK_SIZE_MED = MB;
    public static final long CHUNK_SIZE_HIGH = 2 * MB;
    public static final long CHUNK_SIZE_VERY_HIGH = 4 * MB;

    public static final long SECOND = 1000;
    public static final long MINUTE = SECOND * 60L;
    public static final long HOUR = MINUTE * 60L;
    public static final long DAY = HOUR * 24L;
    /**
     * 默认参数间隔字符
     */
    public static final String PARAMS_SEPARATOR = ";";

    /**
     * 默认日期时间格式
     */
    public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    /**
     * 默认日期格式
     */
    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
    /**
     * 默认时间格式
     */
    public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";

    public static final Integer MAX_BATCH_WRITE_SIZE = 10000;

    /**
     * NODE SERVICEID
     */
    public static final String DC_SID = "geo-dc";
    public static final String DN_SID = "geo-dn";
    public static final String DS_SID = "geo-ds";
    public static final String PLUS_SID = "geo-plus";

    /**
     * KV store
     */
    public static final String SEP = "-";
    public static final String DEFAULT_DB = "sysdb";
    public static final String TILE_DB = "tiledb";
    public static final String CF_SEQ = "sys_seq";
    public static final String CF_LOCK = "sys_lock";
    public static final String CF_CLUSTER = "sys_cluster";
    public static final String CF_FSCHEMA = "dkv_schema";
    public static final String CF_FMETADATA = "dkv_meta";
    public static final String CF_BINLOG = "dkv_binlog";
    public static final String CF_SYNCLOG = "dkv_synclog";

    /**
     * rocks property
     */
    public static final String ROCKS_ESTIMATENUMKEYS = "rocksdb.estimate-num-keys";

    /**
     * key prefix
     */
    public static final String CHKLOG = "chklog";
    public static final String DLOG = "dlog";
    public static final String SYNCLOG_ = "snlog";

    /**
     * TMS 正则路径匹配
     */
    public static final String PATTERN_TMS = "/(\\d+)/(\\d+)/(\\d+)(.png|.i3dm|.b3dm|.terrain)$";
    public static final String PATTERN_TILESET = "/(tileset|layer|scene)(.json)$";
}